import type { Test } from "@server/src/schemas/tests";
import { create } from "zustand";

export interface SelectedTestState {
  selectedTest: Test | null;
  selectTest: (test: Test) => void;
}

export const useSelectedTestStore = create<SelectedTestState>((set) => ({
  selectedTest: null,
  selectTest: (test) => set({ selectedTest: test }),
}));
